﻿Imports System
Imports System.Text
Imports System.Collections.Generic
Imports Microsoft.VisualStudio.TestTools.UnitTesting
Imports DesignPatterns.DoFactory.GangOfFour.Interpreter


<TestClass()> Public Class InterpreterTeste

    Private testContextInstance As TestContext

    '''<summary>
    '''Gets or sets the test context which provides
    '''information about and functionality for the current test run.
    '''</summary>
    Public Property TestContext() As TestContext
        Get
            Return testContextInstance
        End Get
        Set(ByVal value As TestContext)
            testContextInstance = Value
        End Set
    End Property

#Region "Additional test attributes"
    '
    ' You can use the following additional attributes as you write your tests:
    '
    ' Use ClassInitialize to run code before running the first test in the class
    ' <ClassInitialize()> Public Shared Sub MyClassInitialize(ByVal testContext As TestContext)
    ' End Sub
    '
    ' Use ClassCleanup to run code after all tests in a class have run
    ' <ClassCleanup()> Public Shared Sub MyClassCleanup()
    ' End Sub
    '
    ' Use TestInitialize to run code before running each test
    ' <TestInitialize()> Public Sub MyTestInitialize()
    ' End Sub
    '
    ' Use TestCleanup to run code after each test has run
    ' <TestCleanup()> Public Sub MyTestCleanup()
    ' End Sub
    '
#End Region

    <TestMethod()> Public Sub Interpreter_Structural()

        Structural.MainApp.Main()

        'File.WriteAllText("../../../Memento_Structural.txt", _consoleInterceptor.ToString())

        Assert.IsTrue(True)

    End Sub

    <TestMethod()> Public Sub Interpreter_RealWorld()

        RealWorld.MainApp.Main()

        'File.WriteAllText("../../../Memento_RealWorld.txt", _consoleInterceptor.ToString())

        Assert.IsTrue(True)

    End Sub

    <Description("Interpreter aplicado a uma calculadora")> _
    <TestMethod()> Public Sub Interpreter_RealWorld02()
        'http://www.devlake.com/
        'http://www.dotnetlead.com/design-patterns/template-method
        'fonte: http://www.codeproject.com/Articles/186183/Interpreter-Design-Pattern
        RealWorld2.Program.Main()

        'File.WriteAllText("../../../Memento_RealWorld.txt", _consoleInterceptor.ToString())

        Assert.IsTrue(True)

    End Sub

End Class
